package com.ymxx.jweb.component;

public class Msg {

	private Boolean status = false;
	private String msg = "success";
	private String advise = "";
	
	public Msg(Boolean status, String msg) {
		
		this.status = status;
		this.msg = msg;
	}
	public Msg(Boolean status, String msg,String advise) {
		this(status,msg); 
		this.advise = advise;
	}
	public Boolean getStatus() {
		return status;
	}
	public void setStatus(Boolean status) {
		this.status = status;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	
	public String getAdvise() {
		return advise;
	}
	public void setAdvise(String advise) {
		this.advise = advise;
	}
	public String toJson(){
		
		StringBuffer sb = new StringBuffer("");
		sb.append("{\"status\":");
		sb.append(this.status);
		sb.append(",\"msg\":\"");
		sb.append(this.msg+"\"");
		sb.append(",\"advise\":\"");
		sb.append(this.advise+"\"}");
		return sb.toString();
	}
	public static void main(String[] args) {
		System.out.println(new Msg(true, "fsdf", "gfdgdgfg").toJson());
	}
}
